package dao;

import java.util.ArrayList;
import java.util.Date;

public class Student {
	private int id;
	private String name;
	private String gender;
	private Date birthday;
	private ArrayList<Major> scoreList;
	private double[] majorpointavg;
	private Double totalpoint;
	private Double totalpointavg;
	public double getMajorpointavg(int i) {
		return majorpointavg[i];
	}
	public void setMajorpointavg(double[] majorpointavg) {
		this.majorpointavg[0] = majorpointavg[0];
		this.majorpointavg[1] = majorpointavg[1];
		this.majorpointavg[2] = majorpointavg[2];
	}
	public Double getTotalpointavg() {
		return totalpointavg;
	}
	public void setTotalpointavg(Double totalpointavg) {
		this.totalpointavg = totalpointavg;
	}
	public Double getTotalpoint() {
		return totalpoint;
	}
	public void setTotalpoint(Double totalpoint) {
		this.totalpoint = totalpoint;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public Student(){
		this.scoreList=new ArrayList<Major>(3);
                majorpointavg=new double[3];
                scoreList.add(new Major());
                scoreList.add(new Major());
                scoreList.add(new Major());
		this.scoreList.get(0).setMajor("数学");
		this.scoreList.get(1).setMajor("Java");
		this.scoreList.get(2).setMajor("体育");
	}
	
	
	
	public ArrayList<Major> getScoreList() {
		return scoreList;
	}
	public void setScoreList(Major major) {
		this.scoreList.add(major);
	}

    @Override
    public String toString() {
        return "Student{" + "id=" + id + ", name=" + name + ", gender=" + gender + ", birthday=" + birthday + ", scoreList=" + scoreList + ", majorpointavg=" + majorpointavg + ", totalpoint=" + totalpoint + ", totalpointavg=" + totalpointavg + '}';
    }
	

}



 
